package core.objects;

import java.util.Date;

public class Author extends BaseObject {

    private Date birthday;
    private Date deathday;

    public Author(int id, String name) {
        super(id, name);
    }
    
    public Author(int id, String name, Date birthday, Date deathday) {
        super(id, name);
        this.birthday = birthday;
        this.deathday = deathday;
    }

    public void setBirthday(Date d) {
        birthday = d;
    }

    public void setDeathday(Date d) {
        deathday = d;
    }

    public Date getBirthday() {
        return birthday;
    }

    public Date getDeathday() {
        return deathday;
    }
    
    @Override
    public Object[] toObjectArray() {
        return new Object[]{getName(),getBirthday(),getDeathday()};
    }
}
